$(function() {

	
	
	$("#aa").click(function(){
		
		 var form = new FormData(document.getElementById("addForm"));
		 
//		 var shopName = $("#shopName").val();
//		 
//		 $.post("addShopSellInfo",{
//			 shopName :shopName
//			 },function(data){
//			 if(data.code == 200){
//				layer.msg("添加成功", {icon : 1,time : 1500});
//          	}
//		 },"json");
		 
		 $.ajax({
             url:"addShopSellInfo",
             type:"post",
             data:form,
             processData:false,
             contentType:false,
             success:function(data){
             	if(data.code == 200){
             		setTimeout(function(){
 						layer.msg("添加成功", {icon : 1,time : 1500});
 					},1500);
             	}
             },
             error:function(e){
             	layer.msg("添加失败", {icon : 2,time : 1500,});
             }
         });     
	});
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	/*$("#aa").click(function(){
		alert("aa");
		var data= [{name:"jon",age:"12"},{name:"jic",age:"18"},{name:"petter",age:"14"}]
		$.post(
				"addOrderInfo", 
				{
				or:JSON.stringify(data)  
				 },function(data) {
			if(data.code == 200){
				
			}
		}, "json");
	});
*/
	
   /*$("#aa").click(function(){
	  
	   $.ajax({
	        url: "http://127.0.0.1:8080/adicms/api/login",
	        data: {
	        	loginname: "admin",
	        	password: "admin"
	        }, 
	        beforeSend: function(request) {
	            request.setRequestHeader("token","900be2a2T33BtmsY8e92T33BtmsY4a90T33BtmsY8458T33BtmsYd5a27deba9f5");
	        },
	        dataType: 'JSON',
	        async: false,//请求是否异步，默认为异步
	        success: function (list) {
	        },
	        error: function () {
	        }
	    });
   });*/
});
